﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="UploadFile.ascx.vb" Inherits="Control_Customer_UploadFile" %>
<script type="text/javascript">
    function ComfirmDialog(strText, value, ObjectIdClick, ID, Type) {
        if (value == 0) {
            Confirmbox(strText, value, ObjectIdClick, ID, Type);
            return false;
        } else {
            if (Type == 1) {
                document.getElementById('<%=hidID.ClientID %>').value = ID;
                eval($("#" + ObjectIdClick + "").attr("href"));
            }
            else {

                $("#" + ObjectIdClick + "").click();
            }
        }
    }

</script>
<div  class="BoxField">
    <div  class="Header"><h3>
	    <%=Session("HotelName") %> </h3>
    </div>
    <div class="Required">
          <span class="fieldRequired">&nbsp;</span>Trường yêu cầu nhập dữ liệu
          <div>
             Note: Định dạng file upload foxpro database (*.DBF) 
          </div>
      </div>

    <div class="Error">
       <asp:ValidationSummary ID="ValidationSummary2" runat="server" ForeColor="#FF3300" />
    </div>

		<div class="DivRow">
		<div  class="DivLabel">
			<asp:Label ID="lblFullname" CssClass="TextLabel" runat="server" Text="File upload:" /><span class="fieldRequired">&nbsp;</span>
		</div>
		<div  class="DivTextBox" >
                <asp:FileUpload ID="FileUpload1" runat="server" />

		</div>
		</div>

		<div class="DivRow">
		<div class="DivLabel" >&nbsp;&nbsp;&nbsp;</div>
		<div class="DivTextBox" >
			<asp:Button ID="btnSave" runat="server" Text=" Lưu " CssClass="btn"   />			
            
		</div>
		</div>

 </div>

 
	
	<asp:UpdatePanel ID="uplFiles" runat="server">
	<ContentTemplate>
	
	<div class="HeadTitle"><h3>DANH SÁCH FILE ĐÃ UPLOAD </h3></div><div class="SubjectTitle" >Lọc 
        theo tên:<asp:TextBox ID="txtTitleFilter" runat="server" CssClass='TextBox'></asp:TextBox><asp:Button ID="btnFilter" runat="server" Text='Lọc' CssClass='btn' /></div>
	<asp:GridView ID="grdShow" runat="server" AutoGenerateColumns="False" EmptyDataText="{Không có dữ liệu}"
		   AllowPaging="false"   Width='80%' BorderWidth="1px" CssClass="GridBorder">
		    <Columns>

	<asp:TemplateField>
	<ItemTemplate>
		   <asp:LinkButton ID="lnkbtnDelete" Text="Xóa" runat="server" OnClick="lnkbtnDelete_Click"
			       CausesValidation='False'></asp:LinkButton>
	</ItemTemplate>
	<ItemStyle CssClass="GridTextLink" HorizontalAlign="Center" Width="10%" />
	</asp:TemplateField>
	<asp:TemplateField HeaderText="No">
		  <ItemTemplate>
			    <asp:Label runat="server" ID="lblSTT" Text=''></asp:Label>
	 </ItemTemplate>
		  <ItemStyle Width="5%"  HorizontalAlign="Left" />
	</asp:TemplateField>
		 <asp:TemplateField HeaderText='Tên File'>
		  <ItemTemplate>
			    <asp:HyperLink ID="hplFilename" runat="server"></asp:HyperLink>
		 </ItemTemplate>
		 <ItemStyle Width='25%' CssClass='text_list_links' HorizontalAlign='Left' />
		</asp:TemplateField>
		 <asp:BoundField DataField='Creator' HeaderText='Người tạo'>
			 <ItemStyle  Width='15%' />
		 </asp:BoundField>
		 <asp:BoundField DataField='Created' HeaderText='Ngày upload' DataFormatString="{0:dd/MM/yyyy HH:mm}">
			 <ItemStyle  Width='15%' />
		 </asp:BoundField>

	</Columns>
	 <HeaderStyle Height="26px" HorizontalAlign="Left" CssClass="GridHeader" />
	 <RowStyle CssClass="GridRow" Height="23px" />
	 <AlternatingRowStyle CssClass="GridAlterRow" />
	 <PagerStyle CssClass="GridPaged" HorizontalAlign="Right" Height="23px" />
	 <PagerSettings Mode="Numeric" PageButtonCount="2" />
	 <EmptyDataRowStyle CssClass="GridTextEmpty" HorizontalAlign="Center" />
	</asp:GridView>
	<div><asp:Label ID="lblPage_Size" runat="server" Text="Số bản ghi trên trang:" ></asp:Label>		 <asp:DropDownList ID="drpPage_Size" runat="server" AutoPostBack="True" Width="70px" CssClass="input_form">
		 <asp:ListItem Text="50" Value="50"></asp:ListItem>
		 <asp:ListItem Text="100" Value="100"></asp:ListItem>
		 </asp:DropDownList>
		  <asp:Label ID="lblTotal" runat="server"></asp:Label></div>
	<div style="width: 100%">
		 <!--phan trang-->
		 <div id="results_resultsNavigationDiv" class="paginationEMP">
		 <ul>
		     <asp:LinkButton ID="lnkFirst" runat="server"></asp:LinkButton>
		     <asp:Repeater ID="rptPage" runat="server">
		         <ItemTemplate>
		              <asp:LinkButton ID="lnkTitle" CssClass="page_num" runat="server" OnClick="lnkTitle_Click"></asp:LinkButton>
		         </ItemTemplate>
		    </asp:Repeater>
		    <asp:LinkButton ID="lnkLast" runat="server"></asp:LinkButton>
		   </ul>
		  </div>
		  <asp:HiddenField ID="hidCount" Value="0" runat="server" />
		 <asp:HiddenField ID="hidIndex_page" Value="0" runat="server" />
		 <asp:HiddenField ID="hidCur_Page" Value="1" runat="server" />
		  </div>
	<div style='display: none'>
	<asp:DropDownList ID="drpMessage" runat="server" >
		  <asp:ListItem Text='Bạn có chắc chắn muốn xóa bản ghi này không?' Value='0'></asp:ListItem>
		   <asp:ListItem Text='Bạn có chắc chắn muốn xóa bản đã chọn?' Value='1'></asp:ListItem>
	 <asp:ListItem Text='Bạn phải chọn ít nhất một bản ghi.' Value='2'></asp:ListItem>
	</asp:DropDownList>
	 <asp:HiddenField ID="hidID" Value="0" runat="server" />
	</div>
	</ContentTemplate>
	</asp:UpdatePanel>

